#!/bin/bash
#从终端中不断读取用户输入的正数，并求和

sum=0
while read n
do
	if((n>0))
	then ((sum+=n))
	else
	break
	fi
done
echo "sum = $sum"
